import React, { useEffect } from 'react';

const LotteryCanvas = () => {
  useEffect(() => {
    // TagCanvas.Start('myCanvas', '', {
    //   textColour: null,
    //   initial: speed(),
    //   dragControl: 1,
    //   textHeight: 14,
    // });

    // // 在组件销毁时清理 TagCanvas
    // return () => {
    //   TagCanvas.Delete('myCanvas');
    // };
    console.log(window.TagCanvas, 'TagCanvas debug')
  }, []);

  const speed = () => {
    return [0.1 * Math.random() + 0.01, -(0.1 * Math.random() + 0.01)];
  };

  return (
    <canvas id="myCanvas" width={document.body.offsetWidth} height={document.body.offsetHeight}></canvas>
  );
};

export default LotteryCanvas;
